<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>creditors.html</title>
</head>
<body>
    <table>
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>电话</th>
            <th>地址</th>
            <th></th>
        </tr>
        <tr th:each="creditorInfo:${creditorInfoList}">
            <td th:text="${creditorInfo.id}">序号</td>
            <td th:text="${creditorInfo.realName}">姓名</td>
            <td th:text="${creditorInfo.sex == 1?'男':'女'}">性别</td>
            <td th:text="${creditorInfo.phone}">电话</th>
            <td th:text="${creditorInfo.address}">地址</td>
            <td>
                <span th:if="${creditorInfo.remoteFilePath == null || creditorInfo.remoteFilePath == ''}">
                    <a th:href="@{|/upload/${creditorInfo.id}|}">上传</a>
                </span>
                <span th:if="${creditorInfo.remoteFilePath != null && creditorInfo.remoteFilePath != ''}">
                    <a th:href="@{|/download/${creditorInfo.id}|}">下载</a>
                    <a th:href="@{|/delete/${creditorInfo.id}|}">删除</a>
                </span>
            </td>
        </tr>
    </table>
</body>
</html>